Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Merge master into v12.0.0 #25427

Merged
merged 18 commits into from
Jun 19, 2024
Merged

chore: Merge master into v12.0.0 #25427

merged 18 commits into from
Jun 19, 2024

Conversation

danjm
Copy link
Contributor

@danjm danjm commented Jun 19, 2024

This is an alternative to #25389

It is largely the same except:

  • lavamoat/browserify/desktop/policy.json has been modified by 1 line
  • the security tab doesn't have a duplicate marketing toggle
  • the test/e2e/mock-e2e.js changes have been dropped
  • yarn.lock has been further deduped
  • the blockaid banner snapshot tests have been updated because blockaid bumped a patch version
  • test/e2e/default-fixture.js has been fixed to get e2e tests passing

hjetpoluru and others added 15 commits June 13, 2024 10:03
## **Description**

update @blockaid/ppom_release to version 1.4.7

## **Related issues**
NA

## **Manual testing steps**
NA

## **Screenshots/Recordings**
NA

## **Pre-merge author checklist**

- [X] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [X] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [X] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
…for onboarded users (#25303)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Fixes two bugs:
- Privacy policy toast should not be seen during onboarding
- Users who onboarded after the privacy policy date should not see the
new privacy policy toast.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25217?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

New user onbaording after the date:
1. Set the privacy policy date to a date in the future from today
2. Onboard (create a new user)
3. User should not see the privacy policy toast at any moment

New user onboarding before the date:
1. Set the privacy policy date to a date in the past from today.
2. Onboard (create a new user)
3. User should not see the privacy policy toast at any moment
4. Set the privacy policy date to a date in the future from today
5. User should not see the privacy policy toast on the home screen

Old user after the privacy policy date:
1. Have a user already onboarded
2. Make sure the `onboardingDate` is `null` in the redux state (this
simulates a user who has registered before this PR has been in
production)
3. Set the privacy policy date to a date in the future from today
4. User should not see the new privacy policy toast

Old user before the privacy policy date:
1. Have a user onboarded
2. Make sure the `onboardingDate` is `null` in the redux state (this
simulates a user who has registered before this PR has been in
production)
3. Set the privacy policy date to a date in the past before today
4. User should see the new privacy policy toast

TL;DR: If the privacy policy date is in the future, the user should
never see it -BUT- if the privacy policy is in the past, the user should
see it, as long as the user onboarded before the privacy policy date.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

Co-authored-by: David Walsh <[email protected]>
Co-authored-by: Brian Bergeron <[email protected]>
Co-authored-by: NidhiKJha <[email protected]>
Co-authored-by: Nidhi Kumari <[email protected]>
This effectively relates to two separate fixes for issues with polling
behavior.

-
https://github.com/MetaMask/smart-transactions-controller/releases/tag/v10.1.1

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25030?quickstart=1)

- Follow-up to and aligns with #24861
- #24913

-
MetaMask/smart-transactions-controller@v10.0.1...v10.1.1
- MetaMask/smart-transactions-controller#347
- MetaMask/smart-transactions-controller#339
- MetaMask/smart-transactions-controller#342

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Cherry pick: update @metamask/smart-transactions-controller@^10.0.1->^10.1.2
…to Version v11.16.11 (#25304)

cherry-pick chore: revert recent gas api endpoint changes
04642d2 (#25230) into Version v11.16.11

Merge conflicts were resolved by comparing this PR diff with the
[intended
diff](https://github.com/MetaMask/metamask-extension/pull/25230/files).

```bash
CONFLICT (content): Merge conflict in app/scripts/metamask-controller.js
CONFLICT (content): Merge conflict in package.json
CONFLICT (content): Merge conflict in shared/constants/swaps.ts
CONFLICT (content): Merge conflict in shared/lib/swaps-utils.js
CONFLICT (content): Merge conflict in test/e2e/mock-e2e.js
CONFLICT (content): Merge conflict in test/jest/constants.js
CONFLICT (content): Merge conflict in yarn.lock
```

---------

Co-authored-by: MetaMask Bot <[email protected]>
Adds data collection for marketing toggles (and toasts/warnings) on:
- Onboarding
- Toast in Wallet
- Settings page

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/24605?quickstart=1)

Fixes:
MetaMask/MetaMask-planning#2437
MetaMask/MetaMask-planning#2438
MetaMask/MetaMask-planning#2526

Onboarding checkbox:
Make the `metametrics.js` to return `renderOnboarding` instead of
`renderLegacyOnboarding`
1. Start a new account
2. There should be a new checkbox that asks for marketing consent
3. Checking it should set the marketing consent to true (check at
Settings, Securty tab page)

Security tab:
1. Go to Security tab
2. When checking the "Data collection for marketing" to `true`, the
"Participate in MetaMetrics" toggle should turn to `true`
3. When checking "Participate in MetaMetrics" to `false`, "Data
collection for marketing" should be set to `false`
4. When "Participate in Metametrics" is `true` and "Data collection for
marketing" is `true`, and the latter is set to `false`, a warning
message should appear.

Toast:
An already onboarded user will have the "dataCollectionForMarketing"
value as `null` (neither `true` or `false`). This will trigger the
toast.
1. By clicking on "I accept", it should set the "Data collection for
marketing" to `true`.
2. By closing the toast or clicking on "No thanks", it should set the
"Data collection for marketing" to `false`.

All of these actions should trigger subsequent Segment events.

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

<!-- [screenshots/recordings] -->

<img width="646" alt="Screenshot 2024-05-20 at 14 19 53"
src="https://github.com/MetaMask/metamask-extension/assets/11148144/a13b70ec-1d89-4e9f-8df1-2096dd56e642">

https://github.com/MetaMask/metamask-extension/assets/11148144/5eb59902-768d-4d07-a112-5aeb5471587d

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: Mircea Nistor <[email protected]>
Co-authored-by: NidhiKJha <[email protected]>
Co-authored-by: David Walsh <[email protected]>
Co-authored-by: legobeat <[email protected]>
Co-authored-by: Nidhi Kumari <[email protected]>
Fixes lint errors and e2e failures on v11.16.12, which would have been
introduced during conflict resolution when cherry-picking #24605

Specifically:
- `test/e2e/default-fixture.js` is deleted as that file does not exist
on master yet and is not used. However, importantly, the change made in
`test/e2e/default-fixture.js` in #24605 is now applied to
`test/e2e/fixture-builder.js` (this was needed for e2e tests to pass)
- delete
`ui/pages/settings/security-tab/metametrics-toggle/metametrics-toggle.tsx`
and the associated test file, as these seem to be unused
- delete unused variables in
`ui/pages/settings/security-tab/security-tab.component.js`
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

Copy link

socket-security bot commented Jun 19, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@blockaid/[email protected] None 0 0 B

🚮 Removed packages: npm/@blockaid/[email protected]

View full report↗︎

@danjm danjm force-pushed the v12-merge-master-alt branch from 603341d to 04d8e61 Compare June 19, 2024 16:40
@danjm danjm force-pushed the v12-merge-master-alt branch from 04d8e61 to bac6155 Compare June 19, 2024 19:03
danjm and others added 2 commits June 19, 2024 18:08
… policy components to not be shown (#25390)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

Fixture / mock data in unit and e2e tests have been modified to handle
the privacy policy toast. These tests previously assumed that the
privacy policy toast, and in one case the updated metametrics component
during onboarding, would not be shown. However, their display was date
dependent. With this PR, the updated test data takes these dates into
account, and tests should now pass.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25390?quickstart=1)

Fixes: failing tests on develop

e2e and unit tests should pass

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

<!-- [screenshots/recordings] -->

<!-- [screenshots/recordings] -->

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: Dan Miller <[email protected]>
@danjm danjm force-pushed the v12-merge-master-alt branch from c888eae to fc9bcff Compare June 19, 2024 20:53
@danjm danjm marked this pull request as ready for review June 19, 2024 21:39
@danjm danjm requested review from a team as code owners June 19, 2024 21:39
@danjm danjm changed the title V12 merge master alt chore: Merge master into v12.0.0 Jun 19, 2024
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Jun 19, 2024
@danjm danjm merged commit cada935 into Version-v12.0.0 Jun 19, 2024
76 of 77 checks passed
@danjm danjm deleted the v12-merge-master-alt branch June 19, 2024 21:40
@github-actions github-actions bot locked and limited conversation to collaborators Jun 19, 2024
@metamaskbot metamaskbot added the release-12.0.0 Issue or pull request that will be included in release 12.0.0 label Aug 19, 2024
@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-12.0.0 on PR, as PR was added to branch 12.0.0 when release was cut.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template release-12.0.0 Issue or pull request that will be included in release 12.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants